{extend name="public/base"}

{block name="title"}就行天下-提现{/block}

{block name="style"}
<link rel="stylesheet" href="__STATIC__/home/css/business.css" />
{/block}

{block name="main"}
<div class="pageControl bg-f5">
    <div class="main-top"></div>
    <div class="msui_nav msui_navTop">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">添加银行卡</h1>
        <a href="" class="msui_navTop-right msui_navTop-cnav"><i class="micon-cnav"></i></a>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__bd text-center">
            <p class="cl-9999">银行卡仅支持储蓄卡,请不要填写信用卡</p>
        </div>
    </div>
    <div class="addCard">
        <form action="?" method="post">
        <div class="weui-cell userName">
            <div class="weui-label">
                <span class="fs07">姓名</span>
            </div>
            <div class="weui-cell__bd">
                <input type="text" placeholder="请输入姓名" class="weui-input" name="proposer">
            </div>
        </div>
        <div class="weui-cell cardNumber">
            <div class="weui-label">
                <span class="fs07">银行卡号</span>
            </div>
            <div class="weui-cell__bd">
                <input type="text" placeholder="请输入银行卡号" class="weui-input" name="bank_card">
            </div>
        </div>
        <div class="weui-cell phoneNumber">
            <div class="weui-label">
                <span class="fs07">手机号</span>
            </div>
            <div class="weui-cell__bd">
                <input type="number" placeholder="请输入银行预留号码" class="weui-input cardCount" name="mobile">
            </div>
        </div>
        </form>
    </div>

    <div class="p05">
        <button class="login-btn cl-f" disabled="disabled">下一步</button>
    </div>

</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $(".addCard").on('keyup','.weui-input',function () {
            if($('.userName .weui-input').val()!=''&&$('.idNumber .weui-input').val()!=''&&$('.cardNumber .weui-input').val()!=''&&$('.phoneNumber .weui-input').val()!=''){
                $('.login-btn').removeAttr('disabled');
            }else{
                $('.login-btn').attr('disabled','disabled');
            }
        });

        $('.login-btn').click(function () {
            var _form = $('form');
            $.ajax({
                type : 'POST',
                url : _form.attr('action'),
                data : _form.serialize(),
                dataType : 'json',
                success : function(msg) {
                    console.log(msg);
                }
            });
        });
    })
</script>

{/block}